﻿using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;

namespace Marmat.Forms
{
    public partial class TopicBar
    {

        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public TopicBarRenderer Renderer
        {
            get
            {
                return this.m_Renderer;
            }

            set
            {
                this.m_Renderer = value;
            }
        }

        private TopicBarRenderer m_Renderer;
        private TopicBarPageCollection _Pages;

        [Editor(typeof(TopicBar_GlobalEditor), typeof(UITypeEditor))]
        [EditorBrowsable(EditorBrowsableState.Always)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public TopicBarPageCollection Pages
        {
            get
            {
                if (this._Pages is null)
                {
                    this._Pages = new TopicBarPageCollection(this);
                }

                return this._Pages;
            }

            set
            {
                this._Pages = value;
            }
        }

        internal TopicBarItem _SelectedItem;
        /// <summary>
    /// 获取当前选定的TopicBarItem
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public TopicBarItem SelectedItem
        {
            get
            {
                return this._SelectedItem;
            }
        }

        private Color _BackColor;

        public override Color BackColor
        {
            get
            {
                // If Me._BackColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "BackColor")
                // End If
                return this._BackColor;
            }

            set
            {
                this._BackColor = value;
                base.BackColor = value;
            }
        }
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        // Private _Image As Image
        // <DefaultValue(CStr(Nothing))>
        // Public Property Image As Image
        // Get
        // Return Me._Image
        // End Get
        // Set(value As Image)
        // Me._Image = value
        // End Set
        // End Property

        /// <summary>
    /// 返回或设置是否允许折叠NavigatePage。
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [DefaultValue(true)]
        [Description("返回或设置是否允许折叠NavigatePage。")]
        public bool AllowFold
        {
            get
            {
                return this.m_AllowFold;
            }

            set
            {
                this.m_AllowFold = value;
            }
        }

        private bool m_AllowFold = true;

        /// <summary>
    /// 获取或设置TopicBar的绘制模式在Col模式下，项的最大宽度。
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [DefaultValue(80)]
        [Category("Col")]
        [Description("获取或设置TopicBar的绘制模式在Col模式下，项的最大宽度。")]
        public int MaxItemWith
        {
            get
            {
                return this.m_MaxItemWith;
            }

            set
            {
                this.m_MaxItemWith = value;
            }
        }

        private int m_MaxItemWith = 80;

        /// <summary>
    /// 获取或设置TopicBar的绘制模式。
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [DefaultValue(typeof(DarwModeEnum), "Row")]
        [Category("外观")]
        [Description("获取或设置TopicBar的绘制模式。")]
        public DarwModeEnum DrawMode
        {
            get
            {
                return this.m_DrawMode;
            }

            set
            {
                if (this.m_DrawMode != value)
                {
                    this.m_DrawMode = value;
                    this.Invalidate();
                }
            }
        }

        private DarwModeEnum m_DrawMode = DarwModeEnum.Row;

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public Size IconSize { get; set; } = new Size(24, 24);

        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        private int _PageHeight = 40;
        /// <summary>
    /// 获取或设置Page项的高度
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [DefaultValue(40)]
        [Category("外观")]
        [Description("获取或设置Page项的高度。")]
        public int PageHeight
        {
            get
            {
                return this._PageHeight;
            }

            set
            {
                this._PageHeight = value;
                this.Invalidate();
            }
        }

        private Font _PageForeFont = new Font("宋体", 9.0f);

        [DefaultValue(typeof(Font), "宋体,9pt")]
        [Category("外观_默认")]
        [Description("获取或设置Page项的字体。")]
        public Font PageForeFont
        {
            get
            {
                return this._PageForeFont;
            }

            set
            {
                this._PageForeFont = value;
            }
        }

        private Color _PageForeColor;

        [Category("外观_默认")]
        [Description("获取或设置Page项的字体颜色。")]
        public Color PageForeColor
        {
            get
            {
                // If Me._PageForeColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageForeColor")
                // End If
                return this._PageForeColor;
            }

            set
            {
                this._PageForeColor = value;
            }
        }

        private Color _PageTopColor;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的上部分颜色，达到渐变的效果。")]
        public Color PageTopColor
        {
            get
            {
                // If Me._PageTopColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageTopColor")
                // End If
                return this._PageTopColor;
            }

            set
            {
                this._PageTopColor = value;
            }
        }

        private Color _PageBottomColor;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的下部分颜色，达到渐变的效果。")]
        public Color PageBottomColor
        {
            get
            {
                // If Me._PageBottomColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageBottomColor")
                // End If
                return this._PageBottomColor;
            }

            set
            {
                this._PageBottomColor = value;
            }
        }

        private Color _PageSplit0Color;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的上部分的第一条分割线颜色。")]
        public Color PageSplit0Color
        {
            get
            {
                // If Me._PageSplit0Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageSplit0Color")
                // End If
                return this._PageSplit0Color;
            }

            set
            {
                this._PageSplit0Color = value;
            }
        }

        private Color _PageSplit1Color;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的上部分的第二条分割线颜色。")]
        public Color PageSplit1Color
        {
            get
            {
                // If Me._PageSplit1Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageSplit1Color")
                // End If
                return this._PageSplit1Color;
            }

            set
            {
                this._PageSplit1Color = value;
            }
        }

        private Color _PageSplit2Color;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的下部分的第一条分割线颜色。")]
        public Color PageSplit2Color
        {
            get
            {
                // If Me._PageSplit2Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "PageSplit2Color")
                // End If
                return this._PageSplit2Color;
            }

            set
            {
                this._PageSplit2Color = value;
            }
        }

        private int _PageSpacing = 0;

        [DefaultValue(0)]
        [Category("外观")]
        [Description("获取或设置Page项的间距。")]
        public int PageSpacing
        {
            get
            {
                return this._PageSpacing;
            }

            set
            {
                if (value >= 0)
                {
                    this._PageSpacing = value;
                }

                this.Invalidate();
            }
        }
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        private int _ItemHeight = 28;
        /// <summary>
    /// 获取或设置Item项的高度
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        [DefaultValue(28)]
        [Category("外观")]
        [Description("获取或设置Item项的高度。")]
        public int ItemHeight
        {
            get
            {
                return this._ItemHeight;
            }

            set
            {
                this._ItemHeight = value;
                this.Invalidate();
            }
        }

        private Font _ItemForeFont = new Font("宋体", 9.0f);

        [DefaultValue(typeof(Font), "宋体,9pt")]
        [Category("外观_默认")]
        [Description("获取或设置Item项的字体。")]
        public Font ItemForeFont
        {
            get
            {
                return this._ItemForeFont;
            }

            set
            {
                this._ItemForeFont = value;
            }
        }

        private Color _ItemForeColor;

        [Category("外观_默认")]
        [Description("获取或设置Item项的字体颜色。")]
        public Color ItemForeColor
        {
            get
            {
                // If Me._ItemForeColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "ItemForeColor")
                // End If
                return this._ItemForeColor;
            }

            set
            {
                this._ItemForeColor = value;
            }
        }

        private Color _ItemTopColor;

        [Category("外观_默认")]
        [Description("获取或设置Item项矩形的上部分颜色，达到渐变的效果。")]
        public Color ItemTopColor
        {
            get
            {
                // If Me._ItemTopColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "ItemTopColor")
                // End If
                return this._ItemTopColor;
            }

            set
            {
                this._ItemTopColor = value;
            }
        }

        private Color _ItemBottomColor;

        [Category("外观_默认")]
        [Description("获取或设置Item项矩形的下部分颜色，达到渐变的效果。")]
        public Color ItemBottomColor
        {
            get
            {
                // If Me._ItemBottomColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "ItemBottomColor")
                // End If
                return this._ItemBottomColor;
            }

            set
            {
                this._ItemBottomColor = value;
            }
        }

        private Color _ItemSplit0Color;

        [Category("外观_默认")]
        [Description("获取或设置Page项矩形的上部分的第一条分割线颜色。")]
        public Color ItemSplit0Color
        {
            get
            {
                // If Me._ItemSplit0Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "ItemSplit0Color")
                // End If
                return this._ItemSplit0Color;
            }

            set
            {
                this._ItemSplit0Color = value;
            }
        }

        private Color _ItemSplit1Color;

        [Category("外观_默认")]
        [Description("获取或设置Item项矩形的下部分的第一条分割线颜色。")]
        public Color ItemSplit1Color
        {
            get
            {
                // If Me._ItemSplit1Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "ItemSplit1Color")
                // End If
                return this._ItemSplit1Color;
            }

            set
            {
                this._ItemSplit1Color = value;
            }
        }

        private int _ItemSpacing;

        [DefaultValue(0)]
        [Category("外观")]
        [Description("获取或设置Item项的间距。")]
        public int ItemSpacing
        {
            get
            {
                return this._ItemSpacing;
            }

            set
            {
                this._ItemSpacing = value;
            }
        }
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        private Font _MouseMovePageFont = new Font("宋体", 9.0f);

        [DefaultValue(typeof(Font), "宋体,9pt")]
        [Category("外观_鼠标")]
        [Description("获取或设置在鼠标在Page项时的字体。")]
        public Font MouseMovePageFont
        {
            get
            {
                return this._MouseMovePageFont;
            }

            set
            {
                this._MouseMovePageFont = value;
            }
        }

        private Color _MouseMovePageForeColor;

        [Category("外观_鼠标")]
        [Description("获取或设置在鼠标在Page项时的字体颜色。")]
        public Color MouseMovePageForeColor
        {
            get
            {
                // If Me._MouseMovePageForeColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageForeColor")
                // End If
                return this._MouseMovePageForeColor;
            }

            set
            {
                this._MouseMovePageForeColor = value;
            }
        }

        private Color _MouseMovePageTopColor;

        [Category("外观_鼠标")]
        [Description("获取或设置鼠标在Page项时矩形的上部分颜色，达到渐变的效果。")]
        public Color MouseMovePageTopColor
        {
            get
            {
                // If Me._MouseMovePageTopColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageTopColor")
                // End If
                return this._MouseMovePageTopColor;
            }

            set
            {
                this._MouseMovePageTopColor = value;
            }
        }

        private Color _MouseMovePageBottomColor;

        [Category("外观_鼠标")]
        [Description("获取或设置鼠标在Page项时矩形的下部分颜色，达到渐变的效果。")]
        public Color MouseMovePageBottomColor
        {
            get
            {
                // If Me._MouseMovePageBottomColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageBottomColor")
                // End If
                return this._MouseMovePageBottomColor;
            }

            set
            {
                this._MouseMovePageBottomColor = value;
            }
        }

        private Color _MouseMovePageSplit0Color;

        [Category("外观_鼠标")]
        [Description("获取或设置鼠标在Page项时矩形的上部分的第一条分割线颜色。")]
        public Color MouseMovePageSplit0Color
        {
            get
            {
                // If Me._MouseMovePageSplit0Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageSplit0Color")
                // End If
                return this._MouseMovePageSplit0Color;
            }

            set
            {
                this._MouseMovePageSplit0Color = value;
            }
        }

        private Color _MouseMovePageSplit1Color;

        [Category("外观_鼠标")]
        [Description("获取或设置鼠标在Page项时矩形的上部分的第二条分割线颜色。")]
        public Color MouseMovePageSplit1Color
        {
            get
            {
                // If Me._MouseMovePageSplit1Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageSplit1Color")
                // End If
                return this._MouseMovePageSplit1Color;
            }

            set
            {
                this._MouseMovePageSplit1Color = value;
            }
        }

        private Color _MouseMovePageSplit2Color;

        [Category("外观_鼠标")]
        [Description("获取或设置鼠标在Page项时矩形的下部分的第一条分割线颜色。")]
        public Color MouseMovePageSplit2Color
        {
            get
            {
                // If Me._MouseMovePageSplit2Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMovePageSplit2Color")
                // End If
                return this._MouseMovePageSplit2Color;
            }

            set
            {
                this._MouseMovePageSplit2Color = value;
            }
        }
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        private Font _MouseMoveItemFont = new Font("宋体", 9.0f, FontStyle.Underline);

        [DefaultValue(typeof(Font), "宋体, 9pt, style=Underline")]
        [Category("外观_鼠标")]
        [Description("获取或设置Item项的字体。")]
        public Font MouseMoveItemFont
        {
            get
            {
                return this._MouseMoveItemFont;
            }

            set
            {
                this._MouseMoveItemFont = value;
            }
        }

        private Color _MouseMoveItemForeColor;

        [Category("外观_鼠标")]
        [Description("获取或设置Item项的字体颜色。")]
        public Color MouseMoveItemForeColor
        {
            get
            {
                // If Me._MouseMoveItemForeColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMoveItemForeColor")
                // End If
                return this._MouseMoveItemForeColor;
            }

            set
            {
                this._MouseMoveItemForeColor = value;
            }
        }

        private Color _MouseMoveItemTopColor;

        [Category("外观_鼠标")]
        [Description("获取或设置Item项矩形的上部分颜色，达到渐变的效果。")]
        public Color MouseMoveItemTopColor
        {
            get
            {
                // If Me._MouseMoveItemTopColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMoveItemTopColor")
                // End If
                return this._MouseMoveItemTopColor;
            }

            set
            {
                this._MouseMoveItemTopColor = value;
            }
        }

        private Color _MouseMoveItemBottomColor;

        [Category("外观_鼠标")]
        [Description("获取或设置Item项矩形的下部分颜色，达到渐变的效果。")]
        public Color MouseMoveItemBottomColor
        {
            get
            {
                // If Me._MouseMoveItemBottomColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMoveItemBottomColor")
                // End If
                return this._MouseMoveItemBottomColor;
            }

            set
            {
                this._MouseMoveItemBottomColor = value;
            }
        }

        private Color _MouseMoveItemSplit0Color;

        [Category("外观_鼠标")]
        [Description("获取或设置Page项矩形的上部分的第一条分割线颜色。")]
        public Color MouseMoveItemSplit0Color
        {
            get
            {
                // If Me._MouseMoveItemSplit0Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMoveItemSplit0Color")
                // End If
                return this._MouseMoveItemSplit0Color;
            }

            set
            {
                this._MouseMoveItemSplit0Color = value;
            }
        }

        private Color _MouseMoveItemSplit1Color;

        [Category("外观_鼠标")]
        [Description("获取或设置Item项矩形的下部分的第一条分割线颜色。")]
        public Color MouseMoveItemSplit1Color
        {
            get
            {
                // If Me._MouseMoveItemSplit1Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "MouseMoveItemSplit1Color")
                // End If
                return this._MouseMoveItemSplit1Color;
            }

            set
            {
                this._MouseMoveItemSplit1Color = value;
            }
        }

        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        private Font _SelectedItemFont = new Font("宋体", 9.0f);

        [DefaultValue(typeof(Font), "宋体,9pt")]
        [Category("外观_选中")]
        [Description("获取或设置选中Item项后的字体。")]
        public Font SelectedItemFont
        {
            get
            {
                return this._SelectedItemFont;
            }

            set
            {
                this._SelectedItemFont = value;
            }
        }

        private Color _SelectedItemForeColor;

        [Category("外观_选中")]
        [Description("获取或设置选中Item项后的字体颜色。")]
        public Color SelectedItemForeColor
        {
            get
            {
                // If Me._SelectedItemForeColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "SelectedItemForeColor")
                // End If
                return this._SelectedItemForeColor;
            }

            set
            {
                this._SelectedItemForeColor = value;
            }
        }

        private Color _SelectedItemTopColor;

        [Category("外观_选中")]
        [Description("获取或设置选中Item项后矩形的上部分颜色，达到渐变的效果。")]
        public Color SelectedItemTopColor
        {
            get
            {
                // If Me._SelectedItemTopColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "SelectedItemTopColor")
                // End If
                return this._SelectedItemTopColor;
            }

            set
            {
                this._SelectedItemTopColor = value;
            }
        }

        private Color _SelectedItemBottomColor;

        [Category("外观_选中")]
        [Description("获取或设置选中Item项后矩形的下部分颜色，达到渐变的效果。")]
        public Color SelectedItemBottomColor
        {
            get
            {
                // If Me._SelectedItemBottomColor = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "SelectedItemBottomColor")
                // End If
                return this._SelectedItemBottomColor;
            }

            set
            {
                this._SelectedItemBottomColor = value;
            }
        }

        private Color _SelectedItemSplit0Color;

        [Category("外观_选中")]
        [Description("获取或设置选中Item项矩形的上部分的第一条分割线颜色。")]
        public Color SelectedItemSplit0Color
        {
            get
            {
                // If Me._SelectedItemSplit0Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "SelectedItemSplit0Color")
                // End If
                return this._SelectedItemSplit0Color;
            }

            set
            {
                this._SelectedItemSplit0Color = value;
            }
        }

        private Color _SelectedItemSplit1Color;

        [Category("外观_选中")]
        [Description("获取或设置Item项矩形的下部分的第一条分割线颜色。")]
        public Color SelectedItemSplit1Color
        {
            get
            {
                // If Me._SelectedItemSplit1Color = Color.Empty Then
                // Return Control_Skin.GetControlSkin(Me, "SelectedItemSplit1Color")
                // End If
                return this._SelectedItemSplit1Color;
            }

            set
            {
                this._SelectedItemSplit1Color = value;
            }
        }

        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        /// <summary>
    /// 获取或设置鼠标移动所在的矩形
    /// </summary>
    /// <value></value>
    /// <returns></returns>
    /// <remarks></remarks>
        internal Rectangle SelectedRectangle { get; set; }
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        public enum DarwModeEnum
        {
            Row = 0,
            Col = 1
        }
    }
}